﻿using System;

namespace Bilibili.Model.Video
{
    public sealed class StatModel
    {
        public long View { get; set; }
        public long Danmaku { get; set; }
        public long Reply { get; set; }
        public long Favorite { get; set; }
        public long Coin { get; set; }
        public long Share { get; set; }
        public long Like { get; set; }
        public long Dislike { get; set; }
        public string ViewStr
        {
            get
            {
                if (Convert.ToInt64(View) > 10000)
                {
                    double d = Convert.ToDouble(View) / 10000;
                    return d.ToString("0.0") + "万";
                }
                else
                {
                    return View.ToString();
                }
            }
        }
        public string CoinStr
        {
            get
            {
                if (Coin > 10000)
                {
                    double d = Convert.ToDouble(Coin) / 10000;
                    return d.ToString("0.0") + "万";
                }
                else
                {
                    return Coin.ToString();
                }
            }
        }
        public string DanmakuStr
        {
            get
            {
                if (Danmaku > 10000)
                {
                    double d = Convert.ToDouble(Danmaku) / 10000;
                    return d.ToString("0.0") + "万";
                }
                else
                {
                    return Danmaku.ToString();
                }
            }
        }
        public string FavoriteStr
        {
            get
            {
                if (Favorite > 10000)
                {
                    double d = Convert.ToDouble(Favorite) / 10000;
                    return d.ToString("0.0") + "万";
                }
                else
                {
                    return Favorite.ToString();
                }
            }
        }
        public string LikeStr
        {
            get
            {
                if (Like > 10000)
                {
                    double d = Convert.ToDouble(Like) / 10000;
                    return d.ToString("0.0") + "万";
                }
                else
                {
                    return Like.ToString();
                }
            }
        }
        public string DislikeStr
        {
            get
            {
                if (Dislike > 10000)
                {
                    double d = Convert.ToDouble(Dislike) / 10000;
                    return d.ToString("0.0") + "万";
                }
                else
                {
                    return Dislike.ToString();
                }
            }
        }
    }
}